/*
 * @Author: silas 
 * @Date: 2021-03-26 09:11:19 
 * @Last Modified by: silas
 * @Last Modified time: 2021-04-02 17:12:57
 */

<template>
  <div class="tobBtoC">
    <el-tabs v-model="activeName" @tab-click="handleClick" ref="tabs">
      <el-tab-pane label="光网-后评价" name="first">
        <tab1 ref="tab1"></tab1>
      </el-tab-pane>
      <el-tab-pane label="资源数据导入" name="second">
        <tab2 ref="tab2"></tab2>
      </el-tab-pane>
      <el-tab-pane label="目标参数设定" name="third">
        <tab3 ref="tab3"></tab3>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import prefixAPI from "@/api/prefixAPI";
import { getCookie } from "@/common/js/cookie";
import { getSessionStorage } from "@/common/js/storage";
import { $budgetAPI } from "@/api";
import tab1 from "./tab1-evaliate";
import tab2 from "./tab2-eva-2";
import tab3 from "./tab3-eva-3";
export default {
  name: "lightEvaTabs",
  data() {
    return {
      activeName: "first",
    };
  },
  components: {
    tab1,
    tab2,
    tab3,
  },
  mounted() {
    var that = this;

    if (that.activeName == "first") {
      that.$refs.tab1.init();
    }
    if (that.$route.query && that.$route.query.type == "second") {
      that.activeName = "second";
      that.$refs.tab2.init();
    }
    if (that.$route.query && that.$route.query.type == "third") {
      that.activeName = "third";
      that.$refs.tab3.init();
    }
  },
  data() {
    return {
      form: {
        time: "",
      },
      tableData: [],
      tableLoading: false,
      activeName: "first",
    };
  },
  methods: {
    handleClick(tab, event) {
      var that = this;

      if (tab.name == "first") {
        that.$refs.tab1.init();
      }
      if (tab.name == "second") {
        that.$refs.tab2.init();
      }
      if (tab.name == "third") {
        that.$refs.tab3.init();
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.remark {
  padding-top: 5px;
  text-align: left;
  .attention {
    font-weight: bold;
  }
}
.table-content {
  .table-header {
    display: flex;
    justify-content: space-between;
    .table-title {
      font-size: 14px;
      font-weight: bold;
      height: 30px;
      line-height: 30px;
      span {
        display: inline-block;
        width: 5px;
        height: 5px;
        background-color: #418ee9;
        border-radius: 1000%;
        overflow: hidden;
        margin-right: 10px;
        margin-bottom: 3px;
      }
    }
  }
  .content {
    margin-top: 15px;
  }
}
</style>
